/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.scrum4j.domain;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 *
 * @author LOD
 */
@Entity
@Table(name = "UserStorys")
public class UserStory implements Serializable
{
   private static final long serialVersionUID = 1L;

   @Id
   @GeneratedValue(strategy = GenerationType.AUTO)
   private long userStoryID;

   @Column
   private String name;

   @Column
   private String description;

   @Column
   private int unitSize;

   @Column
   private String owner;

   @Column
   private String team;

   @ManyToOne
   @JoinColumn(referencedColumnName = "projectID", name = "projectID")
   private Project project;

   @ManyToOne
   @JoinColumn(referencedColumnName = "sprintID", name = "sprintID")
   private Sprint sprint;

   public long geUserStoryID()
   {
      return userStoryID;
   }

   public String getDescription()
   {
      return description;
   }

   public void setDescription(String description)
   {
      this.description = description;
   }

   public String getName()
   {
      return name;
   }

   public void setName(String name)
   {
      this.name = name;
   }

   public Project getProject()
   {
      return project;
   }

   public void setProject(Project project)
   {
      this.project = project;
   }

   public String getOwner()
   {
      return owner;
   }

   public void setOwner(String owner)
   {
      this.owner = owner;
   }

   public String getTeam()
   {
      return team;
   }

   public void setTeam(String team)
   {
      this.team = team;
   }

   public int getUnitSize()
   {
      return unitSize;
   }

   public void setUnitSize(int unitSize)
   {
      this.unitSize = unitSize;
   }

   public Sprint getSprint()
   {
      return sprint;
   }

   public void setSprint(Sprint sprint)
   {
      this.sprint = sprint;
   }

   public long getUserStoryID()
   {
      return userStoryID;
   }
}
